package com.huichenghe.xinlvsh01.Ble;

import android.content.Context;
import android.util.Log;

/**
 * Created by lixiaoning on 15-11-9.
 */
public class BleDataForBattery extends BleBaseDataManage
{
    private static int mCurrentBattery = -1;


    public static byte mReceCmd = 0x03;

    public BleDataForBattery()
    {
        setMessageDataByString(mReceCmd, null, true);
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        setMessageDataByString(mReceCmd, null, true);
    }


    /**
     * 处理解析后的data
     * @param mContext
     * @param data
     * @param dataLength
     */
    public static void dealReceData(Context mContext, byte[] data, int dataLength)
    {
        mCurrentBattery = (data[0] & 0xFF);
        Log.i("", "dealReceData :" + mCurrentBattery);
    }

    public static int getmCurrentBattery()
    {
        return mCurrentBattery;
    }

}
